from utils.network import Interface
from utils import memory


class API(Interface):

    def handle(self, req):
        return self.success_respond({
            'list': [{
                'username': user.username,
                'account': user.account
            } for user in memory.users.values()]
        })
